package com.pylc.webapp.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

import java.util.logging.Logger;

/**
 * @author Lindsey
 */
public class LogInterceptor extends AbstractInterceptor {
    @Override
    public String intercept(ActionInvocation actionInvocation) throws Exception {
        Object action = actionInvocation.getAction();
        Logger.getLogger(this.getClass().getName()).info(action.getClass().getName());
        return actionInvocation.invoke();
    }
}
